/*
 * @(#)FdProperties.java May 18, 2007
 * 
 * Copyright 2007 by ChinanetCenter Corporation.
 *
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * ChinanetCenter Corporation ("Confidential Information").  You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with ChinanetCenter.
 * 
 */
package com.cnc.fd.util;

import java.util.Locale;
import java.util.ResourceBundle;




/**
 * 从fd.properties文件中获取系统常量
 * @author 阿闲
 * @date   May 18, 2007
 * @version 1.0
 */
public class FdProperties {
	
	private static ResourceBundle rb = ResourceBundle.getBundle("fd", new Locale("zh", "CN"), FdProperties.class.getClassLoader());

	public static String getProperty(String key){
		try{
			return rb.getString(key).trim();
		}catch(Exception e){
			return null;
		}
	}
	
	public static int getIntProperty(String key){		
		
		String value = getProperty(key);		
		return Integer.parseInt(value);
		
	}
}


